//
//  TT_macroConfig.h
//  ZKGX
//
//  Created by 王洋 on 2020/3/17.
//  Copyright © 2020 王洋. All rights reserved.
//

#ifndef TT_macroConfig_h
#define TT_macroConfig_h

#pragma mark -------- TOOL --------

#if DEBUG
#define NSLog(FORMAT, ...) fprintf(stderr,"------ %s ------ %d 行 ------ %s\n",[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);
#else
#define NSLog(FORMAT, ...) nil
#endif


#define APP_VERSION                 [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]

#define APP_BUILD                 [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]

#define WEAKSELF __weak typeof(self) weakSelf = self;

#pragma mark -------- SIZE --------
#define  TTScreenWidth      [UIScreen mainScreen].bounds.size.width
#define  TTScreenHeight     [UIScreen mainScreen].bounds.size.height

#define IS_IPAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
#define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
#define IS_RETINA ([[UIScreen mainScreen] scale] >= 2.0)

#define IS_IPHONE_4_OR_LESS (IS_IPHONE && SCREEN_MAX_LENGTH < 568.0)
#define IS_IPHONE_5 (IS_IPHONE && SCREEN_MAX_LENGTH == 568.0)
#define IS_IPHONE_6 (IS_IPHONE && SCREEN_MAX_LENGTH == 667.0)
#define IS_IPHONE_6P (IS_IPHONE && SCREEN_MAX_LENGTH == 736.0)
#define IS_IPHONE_X  kIs_iPhoneX
//判断设备版本
#define IOS7 ([[UIDevice currentDevice].systemVersion floatValue]>=7.0&&[[UIDevice currentDevice].systemVersion floatValue]<8.0)
#define IOS8 ([[UIDevice currentDevice].systemVersion floatValue]>=8.0)
#define IOS9 ([[UIDevice currentDevice].systemVersion floatValue]>=9.0)
#define IOS10 ([[UIDevice currentDevice].systemVersion floatValue]>=10.0)
#define IOS11 ([[UIDevice currentDevice].systemVersion floatValue]>=11.0)
#define IOS12 ([[UIDevice currentDevice].systemVersion floatValue]>=12.0)
#define IOS13 ([[UIDevice currentDevice].systemVersion floatValue]>=13.0)
#define IOS14 ([[UIDevice currentDevice].systemVersion floatValue]>=14.0)
#define IOS15 ([[UIDevice currentDevice].systemVersion floatValue]>=15.0)


#define kIs_iphone (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
#define kIs_iPhoneX TTScreenWidth >=375.0f && TTScreenHeight >=812.0f&& kIs_iphone

#define ADAPTER_WIDTH [UIScreen mainScreen].bounds.size.width/375
#define ADAPTER_HEIGHT [UIScreen mainScreen].bounds.size.height/667

/*状态栏高度*/
#define kStatusBarHeight (CGFloat)(kIs_iPhoneX?(44.0):(20.0))
/*导航栏高度*/
#define kNavBarHeight (44)
/*状态栏和导航栏总高度*/
#define kNavBarAndStatusBarHeight (CGFloat)(kIs_iPhoneX?(88.0):(64.0))
/*TabBar高度*/
#define kTabBarHeight (CGFloat)(kIs_iPhoneX?(49.0 + 34.0):(49.0))
/*顶部安全区域远离高度*/
#define kTopBarSafeHeight (CGFloat)(kIs_iPhoneX?(44.0):(0))
/*底部安全区域远离高度*/
#define kBottomSafeHeight (CGFloat)(kIs_iPhoneX?(34.0):(0))
/*iPhoneX的状态栏高度差值*/
#define kTopBarDifHeight (CGFloat)(kIs_iPhoneX?(24.0):(0))
/*导航条和Tabbar总高度*/
#define kNavAndTabHeight (kNavBarAndStatusBarHeight + kTabBarHeight)



#define ProductCategoryViewWidth    300



#pragma mark -------- COLOR --------
#pragma mark --- theme --- color ---
#define default_color_theme_blue            UIColorLightAndDarkHex(0x207ffb,0xFFFFFF)


#pragma mark --- normal --- color ---
#define default_color_blue            UIColorLightAndDarkHex(0x207ffb,0xFFFFFF)
#define default_color_white           UIColorLightAndDarkHex(0xFFFFFF,0x000000)
#define default_color_black           UIColorLightAndDarkHex(0x000000,0xFFFFFF)


#pragma mark  --- bgcolor ---
#define default_color_naviBg_gray       UIColorLightAndDarkHex(0xf1f1f1,0x555555)
#define default_color_segmentBg_gray    UIColorLightAndDarkHex(0xf1f1f1,0x555555)
#define default_color_tableViewBg_gray  UIColorLightAndDarkHex(0xf1f1f1,0x555555)

#define default_color_bg_gray                UIColorLightAndDarkHex(0xf1f1f1,0x666666)
#define default_color_cellbg_gray            UIColorLightAndDarkHex(0xf6f6f6,0x555555)
#define default_color_cellbg_lightGray       UIColorLightAndDarkHex(0xfcfcfc,0x777777)

#define default_color_cellBtnBg_gray         UIColorLightAndDarkHex(0xCCCCCC,0x111111)

#define default_color_btnbg_gray             UIColorLightAndDarkHex(0xf3f3f3,0x525252)

#pragma mark  --- labelcolor ---
#define default_color_cellTitleLabel_gray          UIColorLightAndDarkHex(0x000000,0xFFFFFF)
#define default_color_cellContentLabel_gray        UIColorLightAndDarkHex(0x222222,0xEEEEEE)
#define default_color_cellContentLabel_blue        UIColorLightAndDarkHex(0x207ffb,0xCCCCCC)


#define default_color_naviTitle_gray               UIColorLightAndDarkHex(0x333333,0x666666)
#define default_color_btnTitle_gray                UIColorLightAndDarkHex(0x333333,0x666666)

#define default_norColor_segmentTitle               UIColorLightAndDarkHex(0x333333,0xFFFFFF)
#define default_selColor_segmentTitle               UIColorLightAndDarkHex(0x207ffb,0x207ffb)



#pragma mark  -------- BUSINESS CONFIG --------

//特殊的分类Id 不少业务需要根据这个来判断
//酒店
#define Store_Category_Hotel              @"12"
#define Store_Category_Hotel_int          12

//司仪
#define Store_Category_siyi               @"13"
//摄像
#define Store_Category_shexiang           @"16"
//摄影
#define Store_Category_sheying            @"15"
//跟妆
#define Store_Category_genzhuang          @"14"



#pragma mark  -------- CONFIG --------

//  OSS图片上传
#define OSS_AccessKeyId                 @"LTAI4FkgDZdGTnrNiAJvGQAs"
#define OSS_AccessKeySecret             @"7iGezYFcoxRZNX7FhWgWlZmABkFVNd"

#define OSS_ENDPOINT                    @"http://oss-cn-hangzhou.aliyuncs.com"
#define OSSBUCKET_NAME                  @"pdl-ossrw201909"

#define OSS_IMAGE_PREFIX                @"http://zkgxoss.oss-cn-hangzhou.aliyuncs.com/"


//  极光开发者网站中申请App时，注册的AppId、AppSecret、AppKey


//#define WXAppId @"wx00361f2e18fd26d2"

#define WXAppId @"wxdf4ca1e524b376de"

//wxdf4ca1e524b376de

#ifdef DEBUG


#define IM_CERTIFICATE_ID             22331



#else


#define IM_CERTIFICATE_ID             22330

#endif




#endif /* TT_macroConfig_h */
